package com.caifu.service;

import com.alibaba.excel.constant.ExcelXmlConstants;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.caifu.bean.HealthyArchiveSearchBean;
import com.caifu.bean.Result;
import com.caifu.pojo.*;
import com.caifu.util.DesUtil;
import com.caifu.vo.BillListVO;
import com.caifu.vo.ElderlyInfoVO;
import net.sf.json.JSONObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface IBillService {

    /**
     * 功能描述: 生成日账单
     * @Param:  [date 日期, userNo 用户编号]
     * @Author: szt
     * @Date:   2020/11/25
     */
    Result createDayBill(String date, String userNo) throws Exception;

    /**
     * 功能描述: 获取养老列表
     * @Param:  []
     * @Author: szt
     * @Date:   2020/11/25
     */
    List<YlElderlyInfo> listElder() throws Exception;

    /**
     * 功能描述: 获取当前养老院的楼苑列表
     * @Param:  [pensionNo 养老院编号]
     * @Author: szt
     * @Date:   2020/11/26
     */
    List<YlBuilding> getBuildingListByPensionNo(String pensionNo);

    /**
     * 功能描述: 获取现住老人-列表
     * @Param:  [vo 查询条件]
     * @Author: szt
     * @Date:   2020/11/26
     */
    Result<Object> getElderlyInfoPageList(BillListVO vo);

    /**
     * 功能描述: 获取老人信息
     * @Param:  [userNo 用户编号]
     * @Author: szt
     * @Date:   2020/11/26
     */
    Map<String, Object> getElderlyInfoDetailByUserNo(String userNo) throws Exception;


    /**
     * 功能描述: 获取用户住院月份
     * @Param:  [userNo 用户编号, year 年份]
     * @Author: szt
     * @Date:   2020/11/27
     */
    Result<Object> getMonthArrOfBillYear(String userNo, long year) throws Exception;

    /**
     * 功能描述: 获取用户月结算费初始信息
     * @Param:  [userNo, year, month]
     * @Author: szt
     * @Date:   2020/11/29
     */
    Result<Object> getUserMonthSettleInfo(String userNo, int year, int month) throws Exception;

    /**
     * 功能描述: 保存月结算信息
     * @Param:  [bill, tellerNo]
     * @Author: szt
     * @Date:   2020/11/30
     */
    Result<Object> createMonthBill(YlMonthBill bill, int tellerNo) throws Exception;

    /**
     * 功能描述: 获取用户可缴费日期
     * @Param:  [userNo 用户编号]
     * @Author: szt
     * @Date:   2020/11/30
     */
    Result<Object> getUserBillAbleDay(String userNo) throws Exception;

    /**
     * 功能描述: 保存缴费记录
     * @Param:  [record, tellerNo]
     * @Author: szt
     * @Date:   2020/11/30
     */
    Result<Object> createPaymentRecord(YlPaymentRecord record, int tellerNo) throws Exception;

    /**
     * 功能描述: 缴费列表
     * @Param:  [startDay 开始日期, endDay 结束日期, page 页数, limit 行数]
     * @Author: szt
     * @Date:   2020/12/1
     */
    IPage<Map<String,Object>> pageBillMaps(String startDay, String endDay, String userNo, int page, int limit) throws Exception;

    /**
     * 功能描述: 测试
     * @Param:  [userNo]
     * @Author: szt
     * @Date:   2020/11/30
     */
    Result<Object> test(String userNo) throws Exception;
}
